USE [RexelProductenPortal]
GO

/****** Object:  Table [dbo].[Roles]    Script Date: 11/27/2011 21:52:32 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Roles](
	[id] [int] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
 CONSTRAINT [PK_Role] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

USE [RexelProductenPortal]
GO

/****** Object:  Table [dbo].[Users]    Script Date: 11/27/2011 21:52:32 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Users](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Username] [nvarchar](50) NOT NULL,
	[Password] [nvarchar](20) NOT NULL,
	[RoleId] [int] NOT NULL,
	[AvatarUrl] [nvarchar](100) NULL,
 CONSTRAINT [PK_Users] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

ALTER TABLE [dbo].[Users]  WITH CHECK ADD  CONSTRAINT [FK_Users_Role] FOREIGN KEY([RoleId])
REFERENCES [dbo].[Roles] ([id])
GO

ALTER TABLE [dbo].[Users] CHECK CONSTRAINT [FK_Users_Role]
GO

USE [RexelProductenPortal]
GO

/****** Object:  Table [dbo].[Artikel_MIRROR]    Script Date: 11/27/2011 22:21:21 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[Artikel_MIRROR](
	[Relatiecode fabrikant] [int] NOT NULL,
	[Artikelnummer fabrikant] [varchar](20) NOT NULL,
	[EAN-code artikelnummer] [varchar](14) NULL,
	[Artikelnaam] [varchar](60) NULL,
	[Fabrikaat] [varchar](50) NULL,
	[Serie/programma] [varchar](35) NULL,
	[Type] [varchar](35) NULL,
	[Technische omschrijving] [varchar](160) NULL,
	[Aantal gebruikerseenh art] [varchar](8) NULL,
	[Artikelnummer verwerkbaar] [bit] NULL,
	[Netto gewicht] [float] NULL,
	[Eenheid netto gewicht] [varchar](4) NULL,
	[CBS-nummer] [varchar](12) NULL,
	[Art omschrijving fabrikant] [varchar](2000) NULL,
	[Fabrikantartikelcode voorganger] [varchar](20) NULL,
	[EAN-code voorganger] [varchar](14) NULL,
	[Fabrikantartikelcode vervanger] [varchar](20) NULL,
	[EAN-code vervanger] [varchar](14) NULL,
	[Afbeelding] [varchar](255) NULL,
	[UBIM_code] [smallint] NULL,
	[UBIM_volgnummer] [smallint] NULL,
	[_DP Kern] [bit] NULL,
	[_UNSPSC] [varchar](8) NULL,
	[_HAG_Cat] [tinyint] NULL,
	[_HAG_PL] [tinyint] NULL,
	[_HAG_FN] [tinyint] NULL,
	[_HAG_FS] [tinyint] NULL,
	[_HAG_Cat_Omschrijving] [varchar](100) NULL,
	[_HAG_PL_Omschrijving] [varchar](100) NULL,
	[_HAG_FN_Omschrijving] [varchar](100) NULL,
	[_HAG_FS_Omschrijving] [varchar](100) NULL,
	[_HAG_PInCI] [bit] NOT NULL,
	[_HAG CatInPad] [varchar](300) NULL,
	[_DP TypeNr] [varchar](35) NULL,
	[_Product_Name] [varchar](255) NULL,
	[_Fabory artikelnummer] [varchar](50) NULL,
	[_ArtRex] [varchar](30) NULL,
	[_ArtRHNL] [varchar](30) NULL,
	[_DP HCE Artikel] [bit] NULL,
	[_Ingangsdatum artikel] [smalldatetime] NULL,
	[_Statuscode] [varchar](3) NULL,
	[_Deeplink fabrikant] [varchar](512) NULL,
	[_Product_Description_1] [varchar](255) NULL,
	[_Product_Description_2] [varchar](255) NULL,
	[_Product_Description_3] [varchar](255) NULL,
	[_Product_Description_4] [varchar](255) NULL,
	[_Product_Description_5] [varchar](255) NULL,
	[_Fabrikaat Oud] [varchar](50) NULL,
	[MirrorStatus] [int] NOT NULL,
 CONSTRAINT [PK_Artikel_MIRROR] PRIMARY KEY CLUSTERED 
(
	[Relatiecode fabrikant] ASC,
	[Artikelnummer fabrikant] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO



